import abc

import numpy as np


class TextTokenizer(abc.ABC):
    @property
    @abc.abstractmethod
    def vocab_tokens_n(self) -> int:
        raise NotImplementedError

    @abc.abstractmethod
    def encode(self, text: str) -> np.ndarray:
        raise NotImplementedError

    @abc.abstractmethod
    def decode(self, tokens: np.ndarray) -> str:
        raise NotImplementedError
